package com.itlong.cloud.commons.service.impl;

import com.itlong.cloud.commons.dao.IDeviceElevatorInfoDao;
import com.itlong.cloud.commons.service.IDeviceElevatorInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <desc>
 *      云电梯业务实现类
 * </desc>
 *
 * @createDate 2018/11/30
 */
@Service
public class IDeviceElevatorInfoServiceImpl implements IDeviceElevatorInfoService{
    @Autowired
    IDeviceElevatorInfoDao iDeviceElevatorInfoDao;

    /**
     * <desc>
     *      根据设备序列号获取固件版本
     * </desc>
     *
     * @param deviceUnique
     * @return
     * @author Jiaqi.X
     * @createDate 2018/11/30
     */
    @Override
    public String getVersionByDeviceUnique(String deviceUnique) {
        return iDeviceElevatorInfoDao.getVersionByDeviceUnique(deviceUnique);
    }

    /**
     * <desc>
     *      根据楼层名称查询真实楼层
     * </desc>
     *
     * @param logicFloor
     * @return
     * @author Jiaqi.X
     * @createDate 2018/11/30
     */
    @Override
    public String getFloorNumByLogicFloor(String logicFloor, String deviceUnique) {
        return iDeviceElevatorInfoDao.getFloorNumByLogicFloor(logicFloor,deviceUnique);
    }
}
